Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Environment.IsPrivilegedProcess #77355

Merged
merged 8 commits into from
Nov 3, 2022
Merged

Conversation

iSazonov
Copy link
Contributor

Address #68770

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 23, 2022
@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Oct 23, 2022

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

Address #68770

Author: iSazonov
Assignees: -
Labels:

area-System.Runtime, new-api-needs-documentation, community-contribution

Milestone: -

@iSazonov
Copy link
Contributor Author

Could anybody help please with mono wasm fix?

@kasperk81
Copy link
Contributor

kasperk81 commented Oct 24, 2022

Could anybody help please with mono wasm fix?

private static bool IsAdminProcess() => false; before

@iSazonov
Copy link
Contributor Author

private static bool IsAdminProcess() => false;

@kasperk81 Thanks!

@iSazonov
Copy link
Contributor Author

It seems CI fails are not related the PR change.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

If you search the repo, you'll find a few other places (mainly tests) where code is P/Invoking to geteuid and comparing to 0... this new member can be used instead.

@iSazonov
Copy link
Contributor Author

If you search the repo, you'll find a few other places (mainly tests) where code is P/Invoking to geteuid and comparing to 0... this new member can be used instead.

Will do in follow PR. (There is one Interop.Sys.GetEUid() != 0 too.)

@stephentoub stephentoub merged commit aaf9c8a into dotnet:main Nov 3, 2022
@iSazonov iSazonov deleted the env-ispriv branch November 3, 2022 16:58
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime community-contribution Indicates that the PR has been added by a community member new-api-needs-documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants